# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py3-transitions
_pyname=transitions
pkgver=0.9.0
pkgrel=2
pkgdesc="A lightweight, object-oriented Python state machine implementation"
url="https://github.com/pytransitions/transitions"
arch="noarch"
license="MIT"
depends="py3-six"
makedepends="py3-setuptools"
checkdepends="py3-pytest py3-pycodestyle py3-graphviz"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pyname:0:1}/$_pyname/$_pyname-$pkgver.tar.gz"
builddir="$srcdir"/$_pyname-$pkgver
options="!check" # fail with py311

replaces=py-transitions # Backwards compatibility
provides=py-transitions=$pkgver-r$pkgrel # Backwards compatibility

prepare() {
	default_prepare
	rm tests/test_codestyle.py
}

build() {
	python3 setup.py build
}

check() {
	pytest
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
d324a57e1f2d20d9e8dc7d1f7854a6e81c3a09afda927de38dc23936c8c585b87303d5a47256487ba0cd03f63bb1a2ff69304c634896e488a7217591404f0a3c  transitions-0.9.0.tar.gz
"
